<template>
  <h1>
    您查询的城市是：{{ city }}
  </h1>
  <table>
    <tr>
      <th>日期</th>
      <th>天气情况</th>
      <th>温度</th>
    </tr>

    <tr v-for="(item, index) in res" :key="index">
      <td>{{item.date}}</td>
      <td>{{item.weather}}</td>
      <td>{{item.temperature}}</td>
    </tr>

  </table>
</template>
<script>
export default {
  /* 获取父组件传值 */
  props: {
    city: {
      type: String
    },
    res: {
      type: Object
    }
  }
}

</script>
